<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

<h:head>
    <title>Transportation Mean</title>
</h:head>
<h:body onload="#{transport.searchById()}">
<h:form>
<p:menubar>  
        <p:submenu label="Package Section" >  
            <p:menuitem value="Create Package" url="packageInsertion.xhtml" />  
            <p:menuitem value="All Packages" url="package.xhtml" />  
        </p:submenu>  
  
        <p:submenu label="Hotel Section" >  
            <p:menuitem value="Add Hotel" url="hotelInsert.xhtml" />  
            <p:menuitem value="All Hotel" url="hotel.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Transportation Section" >  
            <p:menuitem value="Add Transportation" url="transportationInsert.xhtml" />  
            <p:menuitem value="All Transportation" url="transportationMean.xhtml" />  
        </p:submenu>  
        
         <p:submenu label="Excursion Section" >  
            <p:menuitem value="Add Excursion" url="excursionInsert.xhtml" />  
            <p:menuitem value="All Excursion" url="excursion.xhtml" />  
        </p:submenu>  
  
       <f:facet name="options">   
       		<p:commandButton value="Check OutDated Package" action="#{CheckInvalid.checkAll()}"/>
            <p:commandButton value="Logout" action="#{LoginManaged.logout()}"/>
       </f:facet>
    </p:menubar>  
	<p:panelGrid columns="2">
	<f:facet name="header">Transportation Mean</f:facet>
	
	<h:outputLabel>Name</h:outputLabel>
	<h:outputText value="#{transport.viewedT.name}" />
	<h:outputLabel>Available Places</h:outputLabel>
	<h:outputText value="#{transport.viewedT.availablePlaces}" />
	<h:outputLabel>Type</h:outputLabel>
	<h:outputText value="#{transport.viewedT.type}" />
	<h:outputLabel>Departure Time</h:outputLabel>
  	<h:outputText value="#{transport.viewedT.departureTime}" >
    	<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
    </h:outputText>
	<h:outputLabel>Arrival Time</h:outputLabel>
	<h:outputText value="#{transport.viewedT.arrivalTime}">
    	<f:convertDateTime type="time" timeStyle="short" timeZone="Europe/Paris"/>
    </h:outputText>
	<h:outputLabel>Departure Date</h:outputLabel>
	<h:outputText value="#{transport.viewedT.departureDate}">
  		<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
	</h:outputText>
	<h:outputLabel>Arrival Date</h:outputLabel>
	<h:outputText value="#{transport.viewedT.arrivalDate}">
  		<f:convertDateTime type="date" pattern="dd-MM-yyyy" timeZone="Europe/Paris"/>
	</h:outputText>
	<h:outputLabel>Departure Place</h:outputLabel>
	<h:outputText value="#{transport.viewedT.departurePlace}" />
	<h:outputLabel>Arrival Place</h:outputLabel>
	<h:outputText value="#{transport.viewedT.arrivalPlace}" />
	<h:outputLabel>Company</h:outputLabel>
	<h:outputText value="#{transport.viewedT.company}" />
	<h:outputLabel>Price</h:outputLabel>
	<h:outputText value="#{transport.viewedT.price}" />
	
	<f:facet name="footer">
		<h:commandLink value="Edit" action="#{transport.changePage(transport.viewedT.id,'e')}" ajax="false" />
	</f:facet>	
	</p:panelGrid>
	<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
</h:form>
</h:body>
</html>